package com.rgs.nginx.controller;

import com.rgs.nginx.exption.ResponseData;
import com.rgs.nginx.service.TestServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Classname TestController
 * @Description TODO
 * @Date 2025/2/13 15:41
 * @Created by rgs
 */
@RestController
@RequestMapping("/test")
public class TestController {

    @Autowired
    private TestServiceImpl testService;

    @GetMapping("/testException/{a}")
    public ResponseData<String> getStr(@PathVariable Integer a) {

        String testStr = testService.test(a);
        return ResponseData.success(testStr);
    }
}
